<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>根据id查询安全配置单</title>
    <title>安全库存配置单查询</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/bootstraptable/bootstrap-table.css" rel="stylesheet">
</head>
<body>

<div style="color: #0e9aef">您正在做的业务是：库存管理--安全库存配置管理--安全库存配置单查询</div>

<div class="container" style="margin-top: 10px;">
    <form class="form-horizontal" id="storage_cellById_form">
        <div>
            配置单编号：<span id="storeId"></span> 其中复核状态：<span id="checkTag"></span>
            <button type="button" class="btn btn-default col-md-offset-7" onclick="javascript:history.back()">返回</button>
        </div>
        <div class="panel panel-default" style="margin-top: 5px;">
            <div class="page-heading">
                <div class="panel-title">
                    <h2 style="text-align: center;margin-top: 30px;">安全库存配置单</h2>
                </div>
            </div>
            <div class="panel-body">

                <div class="form-group">
                    <div class="col-md-6">
                        <label class="control-label col-md-4">产品名称：</label>
                        <div class="col-md-6">
                            <input type="text" class="form-control" readonly
                                   style="border: none;background-color: white" name="productName" id="productName">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <label class="control-label col-md-4">产品编号：</label>
                        <div class="col-md-6">
                            <input type="text" class="form-control" readonly
                                   style="border: none;background-color: white" name="productId" id="productId">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-6">
                        <label class="col-md-4 control-label">库存报警下限数：</label>
                        <div class="col-md-6">
                            <input type="text" class="form-control" readonly style="border: none;background-color: white" name="minAmount"
                                   id="minAmount">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <label class="col-md-4 control-label">库存报警上限数：</label>
                        <div class="col-md-6">
                            <input type="text" class="form-control" readonly style="border: none;background-color: white" name="maxAmount"
                                   id="maxAmount">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-6">
                        <label class="col-md-4 control-label">最大存储量：</label>
                        <div class="col-md-6">
                            <input type="text" class="form-control" readonly style="border: none;background-color: white"
                                   name="maxCapacityAmount" id="maxCapacityAmount">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-6">
                        <label class="col-md-4 control-label">复核人：</label>
                        <div class="col-md-6">
                            <input type="text" class="form-control" style="border: none;background-color: white" name="checker" id="checker">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <label class="col-md-4 control-label">复核时间：</label>
                        <div class="col-md-6">
                            <input type="text" class="form-control" class="form-control" style="border: none;background-color: white"
                                   readonly name="checkTime" id="checkTime">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-6">
                        <label class="col-md-4 control-label">配置要求：</label>
                        <div class="col-md-8">
                           <textarea style="border: none;resize: none;background: white" readonly rows="3" cols="80"
                                     class="form-control" name="config" id="config">
                           </textarea>
                        </div>
                    </div>
                </div>
                <input type="hidden" name="id" id="id">

            </div>
        </div>
    </form>
</div>


<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/js/hAdmin.js?v=4.1.0"></script>
<script src="/js/currentTime.js"></script>

<!-- 第三方插件 -->
<script src="/js/plugins/pace/pace.min.js"></script>

<!--BootstrapTable-->
<script src="/bootstraptable/bootstrap-table.min.js"></script>
<script src="/bootstraptable/locale/bootstrap-table-zh-CN.min.js"></script>

<script>
    $(function () {
        let id = localStorage.getItem("id")
        $.post("/storage/cell/getIdSecurityConfiguration", {"id": id}, function (res) {
            if (res.checkTag == "S001-1") {
                $("#storage_cellById_form #storeId").html(res.storeId).css("color", "green")
                $("#storage_cellById_form #checkTag").html("复核通过").css("color", "green")
            } else {
                $("#storage_cellById_form #storeId").html(res.storeId).css("color", "#eea236")
                $("#storage_cellById_form #checkTag").html("等待复核").css("color", "#eea236")
            }
            $("#storage_cellById_form #productName").val(res.productName)
            $("#storage_cellById_form #productId").val(res.productId)
            $("#storage_cellById_form #minAmount").val(res.minAmount)
            $("#storage_cellById_form #maxAmount").val(res.maxAmount)
            $("#storage_cellById_form #maxCapacityAmount").val(res.maxCapacityAmount)
            $("#storage_cellById_form #checker").val(res.checker)
            if(res.checkTime!=null){
                $("#storage_cellById_form #checkTime").val(formater(res.checkTime))
            }else{
                $("#storage_cellById_form #checkTime").val()
            }
            $("#storage_cellById_form #config").val(res.config)
        })
    })
</script>
</body>
</html>